package com.wanmait.demo.webcontroller.usercontroller;

import com.wanmait.demo.pojo.Community;
import com.wanmait.demo.service.CommunityService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class CommunityController {

    @Resource
    private CommunityService communityService;

    @ResponseBody  //尹山坤
    @RequestMapping("/communitynum")
    public List<Community> communitytnum(String num){

        List<Community> communities= communityService.selectallcommunity(Integer.parseInt(num));

        return communities;

    }




}
